package com.example.rbacmanage.controller.system;

import com.example.rbacmanage.common.Result;
import com.example.rbacmanage.entity.system.UserLog;
import com.example.rbacmanage.service.system.UserLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/userlog")
public class UserLogController {
    @Autowired
    private UserLogService userLogService;
    @GetMapping(value = "/page")
    public Result page(UserLog userLog){
        return Result.success(userLogService.getPage(userLog));
    }

    @GetMapping(value = "/info/{id}")
    public Result info(@PathVariable Long id){
        return Result.success(userLogService.getById(id));
    }
}
